home *** CD-ROM | disk | FTP | other *** search
- program Process; {$R-} {$S-} {$Q-}
- uses
- SBSample,
- CRT;
- procedure ClipSample(var Sample: integer);
- begin
- if Sample > 127 then Sample := 127;
- if Sample < -128 then Sample := -128;
- end;
- procedure ProcessSample(var Sample: byte);
- {Make sure that you clip the sample so it stays in the proper range}
- var
- Temp: integer;
- begin
- Temp := Sample-128;
-
- {Process the sample here}
- Temp := Temp;
-
- ClipSample(Temp);
- Sample := Temp+128;
- end;
- var
- Sample: byte;
- begin
- ResetDSP;
- repeat
- Sample := GetSample;
- ProcessSample(Sample);
- OutputSample(Sample);
- until KeyPressed; ReadKey;
- end.